#pragma once

#include <QtWidgets/QWidget>
#include "ui_Player.h"
#include "../MPG/include/MPG.h"

class MPG;
class Player : public QWidget
{
	Q_OBJECT

public:
	Player(QWidget *parent = Q_NULLPTR);
	~Player();

protected slots:
	void on_btnPlay_clicked( );
	void on_btnClose_clicked();
	void on_btnStop_clicked();
	void on_btnRecord_clicked();
	void on_btnRecordYUV_clicked();
	void on_btnTakePic_clicked();
	void on_btnResolution_clicked();

	void on_varBright_valueChanged(int value);
	void on_varContrast_valueChanged(int value);
	void on_varHue_valueChanged(int value);
	void on_varSaturation_valueChanged(int value);
	void on_varAcuity_valueChanged(int value);
	void on_btnDefault_clicked();
	void on_btnGet_clicked();

	void on_btnOpen_clicked();
	void on_btnOpenYUV_clicked();
	void on_btnSuspend_clicked();
	void on_btnForward_clicked();
	void on_btnRewind_clicked();
	void on_btnShowSLT_clicked();

	void onFrameChanged(const QImage & img);
	void onCameraInfoChanged(const CapCameraInfo & info);

	void on_cmbCamera_currentIndexChanged(int index);

private:
	MPG * Capture;
	Ui::PlayerClass ui;

	int cameraIndex;
	QVector<CapCameraDeviceInfo> cameraList;
};
